/**************************************************************************
 * @name: bmp.h
 * @brief: bmp格式处理头文件
 * @date:
 * @author: boluzs@163.com
 * @note: None
 * @version: 1.0.0
 * @Copyright (c) 2025 by boluzs@163.com, All Rights Reserved.
 **************************************************************************/
// 定义以防止递归包含
#ifndef _BMP_H
#define _BMP_H 1

// (1)、其它头文件

// (2)、宏定义(函数、变量、常量)
// BMP图片字节补齐宏定义
#define BMP_LAST_BYTE(img_width) ((4 - ((img_width) * 3) % 4) % 4)
#define ROLE_MENU "/tmp/starge_project/Data/start/Frame94.bmp"
#define USER_MENU "/tmp/starge_project/Data/userMenu.bmp"
#define KEY_BOARD "/tmp/starge_project/Data/keyBoard.bmp"
#define BACK_GROUD "/tmp/starge_project/Data/backgroud.bmp"
#define CHARGE_MODEL "/tmp/starge_project/Data/charge_model.bmp"
#define MONEY_MODEL "/tmp/starge_project/Data/money_model.bmp"
#define ACCOUNT_MODEL "/tmp/starge_project/Data/account_model.bmp"
#define CHARGE_BMP "/tmp/starge_project/Data/charge_page.bmp"
#define CHARGE_FIRST_BMP "/tmp/starge_project/Data/charge/Frame0.bmp"
#define EYE_BMP "/tmp/starge_project/Data/eye.bmp"
#define EN_EYE_BMP "/tmp/starge_project/Data/en_eye.bmp"
// (3)、自定义类型(结构体、联合体、枚举、函数指针类型.....)

// (4)、函数声明
extern int Bmp_Show(char *filename, unsigned int *lcd_buf, unsigned int x_off, unsigned int y_off);
extern void Lcd_Refresh(unsigned int *lcd_mp, unsigned int *lcd_buf);
extern void Bmp_Sort(DIR *dir_p, struct dirent *dirent_p, char **file_names, unsigned int *cnt);
extern void Get_Ts(void);
// (5)、全局变量声明
typedef struct BmpInfo
{
    unsigned int width;
    unsigned int height;
} BmpInfo_t, *BmpInfo_p;

// 存储触摸数据
extern volatile int touch_keep_running; // 用于控制线程运行状态

// (6)、全局静态变量(定义)

// (7)、全局静态函数(实现)

#endif
